package com.fz.mapper.merchant;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fz.entity.merchant.MerMenu;
import com.fz.entity.merchant.MerRole;
import com.fz.entity.merchant.MerUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fz.vo.merchant.merUser.MerUserVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author I am God
 * @since 2021-04-20
 */
public interface MerUserMapper extends BaseMapper<MerUser> {
    List<MerMenu> findMerMenuPermission(@Param("userid") String userid);

    List<MerRole> findMerRolePermission(@Param("userid") String userid);

    /**
     * 查询用户分页
     *
     * @param page           分页
     * @param lambdaQueryWrapper 查询条件
     * @return
     */
    Page<MerUserVo> findMerUserList(Page<MerUserVo> page, @Param(Constants.WRAPPER) LambdaQueryWrapper<MerUser> lambdaQueryWrapper);

    /**
     * 查询用户不分页
     *
     * @param lambdaQueryWrapper 查询条件
     * @return
     */
    List<MerUserVo> selectMerUsersList(@Param(Constants.WRAPPER) LambdaQueryWrapper<MerUser> lambdaQueryWrapper);
}
